package Dao;

import Controller.User1;
import DaoMain.UserData;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface User {
    @Select("SELECT  * FROM  后台用户表")
    public List<UserData> SelectAll();
    @Select("SELECT  * From  后台用户表 where Id=#{id}")
    public UserData SelectUser(int id);
    @Insert("INSERT INTO 后台用户表(Id,Thename,Super,APassWord) VALUES(#{Id},#{Thename},#{Super},#{APassWord})")
    public boolean  InsertUser(UserData ud);
    @Delete("Delete FROM  后台用户表 where Id=#{Id}")
    public boolean DeleteUser(int Id);
    @Update("UPDATE 后台用户表 set Thename=#{Thename},Super=#{Super},APassWord=#{APassWord} where Id=#{Id}")
    public boolean UpDate(UserData ud);
}
